package job.work.domain.user.reponse;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zzy
 * @Classname DecSysUser
 * @Date 2020/10/16 10:06
 * @Created by Administrator
 */

@Data
public class DecSysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("账号")
    private String username;

    /**
     * 手机号
     */
    @Column(name = "phone")
    @NotBlank(message = "手机号必填")
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 最后一次登陆时间
     */
    @Column(name = "last_login_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;

    /**
     *  0启用 1 禁用
     */
    @ApiModelProperty(value = "0启用 1 禁用")
    @Column(name = "status")
    private Integer status;

    /**
     * 性别 1男 2 女 0 其他
     */
    @ApiModelProperty(value = "性别 1男 2 女 0 其他")
    @Column(name = "gender")
    private Integer gender;

    /**
     * 微信昵称
     */
    @Column(name = "wx_nick_name")
    @ApiModelProperty(value = "微信昵称")
    private String wxNickName;
    /**
     * QQ昵称
     */
    @Column(name = "qq_nick_name")
    @ApiModelProperty(value = "QQ昵称")
    private String qqNickName;

    /**
     *用户头像
     */
    @Column(name = "image")
    private String image;
    /**
     *用户钱包
     */
    @Column(name = "wallet")
    private BigDecimal wallet;



    @Column(name = "role_id")
    @ApiModelProperty(value = "角色ID 0代表普通用户",required = true)
    private Long roleId;



}
